import { api } from "@/lib/request";
import {
  type Response,
  type ServiceValidateResponseData,
} from "@/types/response";
import type { ServiceValidateFormData } from "@/schemas/service-validate";

export const serviceValidateAPI = {
  serviceValidate: async (
    data: ServiceValidateFormData
  ): Promise<Response & { data: ServiceValidateResponseData }> => {
    const response = await api.post("/cas/service-validate", data);
    return response as unknown as Response & {
      data: ServiceValidateResponseData;
    };
  },
};
